home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Makefiles / links.make < prev    next >
Encoding:
Text File  |  1995-01-27  |  792 b   |  29 lines

  1. # links.make
  2. # by Mike Ferris
  3. # Originally part of MOKit; modified by Don Yacktman for
  4. # use in the MiscKit
  5. # Copyright 1993, 1995, all rights reserved
  6.  
  7. # About links.make
  8. #
  9. # This makefile provides a target which will create soft links to
  10. # all the files listed in the make variable SOFTLINKS.
  11. #
  12. # This makefile should be included from the project's Makefile.postamble.
  13. # The Makefile.preamble should add the line "all:: links" to the end
  14. # and should define SOFTLINKS to be a list of files that need to be linked.
  15.  
  16. LINK_ECHO = echo
  17. LINK_LN_S = /bin/ln -s
  18.  
  19. links:
  20.     @if [ "$(SOFTLINKS)" ] ; then \
  21.         $(LINK_ECHO) "Making soft links to $(SOFTLINKS)..." ; \
  22.         for i in `/bin/ls -d $(SOFTLINKS)` ; do \
  23.             if [ ! -r `basename $$i` ] ; then \
  24.                 $(LINK_LN_S) $$i . ; \
  25.             fi ; \
  26.         done ; \
  27.     fi
  28.  
  29.